﻿<%@ Page Title="" Language="C#" MasterPageFile="~/CPSite.Master" AutoEventWireup="true" CodeBehind="SemesterDetails.aspx.cs" Inherits="WebTemplate.ControlPanel.Account.SemesterDetails" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <fieldset>
        <legend>Semester Details</legend>
        <div class="form">
            <asp:Panel ID="panel" runat="server" GroupingText="Semester Details">
                <p>
                    <asp:Label ID="start" runat="server" Text="Start" AssociatedControlID="strdate"></asp:Label>
                    <asp:TextBox ID="strdate" runat="server" TextMode="Date"></asp:TextBox>
                </p>
                <p>

                    <asp:Label ID="end" runat="server" Text="End" AssociatedControlID="enddate"></asp:Label>
                    <asp:TextBox ID="enddate" runat="server" TextMode="Date"></asp:TextBox>
                </p>
                <p>
                    <asp:Label ID="add" runat="server" Text="Courses" AssociatedControlID="New"></asp:Label>
                    <asp:Button ID="New" runat="server" Text="Add Courses" CssClass="formbutton"/>
                </p>
                <asp:Panel ID="Panel1" runat="server" >
                    <asp:ScriptManager ID="script" runat="server"></asp:ScriptManager>
                    <div>
                        <p>
                            <asp:Label ID="courses" runat="server" Text="Course" AssociatedControlID="Course"></asp:Label>
                            <asp:DropDownList ID="Course" runat="server">
                                <asp:ListItem Text="Select Course" Selected="True" Value=""></asp:ListItem>
                            </asp:DropDownList>
                        </p>
                        <p>
                            <asp:Label ID="doctors" runat="server" Text="Doctor" AssociatedControlID="Doctor"></asp:Label>
                            <asp:DropDownList ID="Doctor" runat="server">
                                <asp:ListItem Text="Select Doctor" Selected="True" Value=""></asp:ListItem>
                            </asp:DropDownList>
                        </p>
                        <p>
                            <asp:Label ID="StartTimeS" runat="server" Text="Time" AssociatedControlID="Time"></asp:Label>
                            <asp:TextBox ID="Time" runat="server" TextMode="Time"></asp:TextBox>
                        </p>
                        <p>
                            <asp:Label ID="Place" runat="server" Text="Location" AssociatedControlID="Location"></asp:Label>
                            <asp:DropDownList ID="Location" runat="server">
                                <asp:ListItem Text="Select Location" Selected="True" Value=""></asp:ListItem>
                            </asp:DropDownList>
                        </p>
                        <p>
                            <asp:Button ID="saving" runat="server" Text="Save" CssClass="formbutton" OnClick="saving_Click" />
                        </p>
                    </div>
                </asp:Panel>
                <asp:ModalPopupExtender ID="Custom" runat="server" 
                    TargetControlID="New" PopupControlID="Panel1"
                     BackgroundCssClass="PanelCss"></asp:ModalPopupExtender>
                <p>
                    <asp:GridView ID="CurrentCourses" runat="server" AutoGenerateColumns="false" GridLines="None" DataKeyNames="ID" 
                        AllowPaging="true" PageSize="15" PagerStyle-CssClass="pagger" OnPageIndexChanging="CurrentCourses_PageIndexChanging" OnSorting="CurrentCourses_Sorting" OnRowCommand="CurrentCourses_RowCommand">
                        <Columns>
                            <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
                            <asp:BoundField DataField="Doctor" HeaderText="Doctor" SortExpression="Doctor" />
                            <asp:BoundField DataField="Time" HeaderText="Time" SortExpression="Time" />
                            <asp:BoundField DataField="Location" HeaderText="Location" SortExpression="Location" />
                            <asp:ButtonField CommandName="DeleteCourse" ButtonType="Link" Text="Delete" />
                            <asp:HyperLinkField Text="Edit" DataNavigateUrlFields="Id" DataNavigateUrlFormatString="~/Account/SemesterDetails.aspx?id={0}" />
                        </Columns>
                    </asp:GridView>
                </p>
                

            </asp:Panel>
            
        </div>
    </fieldset>
</asp:Content>
